package com.yh.doing.observer_pattern.version2;

import com.yh.doing.observer_pattern.version1.IHanFeiZi;
import com.yh.doing.observer_pattern.version1.ILiSi;
import com.yh.doing.observer_pattern.version1.LiSi;

/**
 * Created by Rocky on xxxx-xx-xx.
 */
public class HanFeiZi implements IHanFeiZi {

    private ILiSi liSi = new LiSi();

    //韩非子要吃饭了
    public void haveBreakfast() {
        System.out.println("韩非子:开始吃饭了...");
//通知李斯



        this.liSi.update("韩非子在吃饭");
    }

    //韩非子开始娱乐了,古代人没啥娱乐，你能想到的就那么多
    public void haveFun() {
        System.out.println("韩非子:开始娱乐了...");
        this.liSi.update("韩非子在娱乐");
    }
}
